package com.tool.spring.manager;


import com.tool.spring.dao.DaoFactory;
import com.tool.spring.dao.UserDao;

/**
 * @Author: lixiaofei
 */
public class UserManager {
	
	public static  UserManager instance=new UserManager();
	
	
	private UserDao userDao;
	
	private UserManager(){
		this.userDao= DaoFactory.getInstance().createUserDao();//底层会根据不同dao进行切换
	}

	public static UserManager getInstance() {
		return instance;
	}


	public void addUser(String username, String password) {
      this.userDao.addUser(username, password);
	}
	
	

}
